package com.bprogram.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.bprogram.pojo.Power;
import com.bprogram.service.PowerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author cai
 * @since 2023-11-21
 */
@RestController
@RequestMapping("/power")
public class PowerController {
    @Autowired
    private PowerService powerService;
    @GetMapping("/all")
    public List<Power> getAll(){
        QueryWrapper<Power> queryWrapper = new QueryWrapper<>();
        return powerService.list(queryWrapper);
    }
}

